home *** CD-ROM | disk | FTP | other *** search
/ Aminet 23 / Aminet 23 (1998)(GTI - Schatztruhe)[!][Feb 1998].iso / Aminet / misc / emu / amiSPIMsrc.lha / Makefile.amiga.bak < prev    next >
Makefile  |  1994-02-09  |  4KB  |  183 lines

  1. #
  2. # SPIM S20 MIPS Simulator.
  3. # Makefile for SPIM.
  4. # Copyright (C) 1990-1992 by James Larus (larus@cs.wisc.edu).
  5. # ALL RIGHTS RESERVED.
  6. #
  7. # SPIM is distributed under the following conditions:
  8. #
  9. #   You may make copies of SPIM for your own use and modify those copies.
  10. #
  11. #   All copies of SPIM must retain my name and copyright notice.
  12. #
  13. #   You may not sell SPIM or distributed SPIM in conjunction with a commerical
  14. #   product or service without the expressed written consent of James Larus.
  15. #
  16. # THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
  17. # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  18. # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  19. # PURPOSE.
  20. #
  21. # NOTES ON AMIGA VERSION:
  22. #   Amiga modifications by Kjetil Jacobsen / Ymir's Thoughts
  23. #   The distributed binaries were compiled with gcc2.3.3, using gmake and flex.
  24. #   You need ixemul v39.47 (or later) to run SPIM.
  25. #   This Amiga version is based on spim/xspim version 5.4
  26. #
  27. # To make spim, type:
  28. #
  29. #   make spim
  30. #
  31. # To make xpsim, type:
  32. #
  33. #   make xspim
  34. #
  35.  
  36. #
  37. # To make cl-spim (cycle level SPIM simulator), type:
  38. #
  39. #   make cl-spim
  40. #
  41. # To make cl-xpsim, type:
  42. #
  43. #   make cl-xspim
  44. #
  45.  
  46. # This is amiga specific, so it's got an unique vesion number.
  47. ENDIAN = BIGENDIAN
  48. AMIGAVER = 1
  49.  
  50. # Full path for directory containing X11 include files:
  51. X_INCLUDE_DIR = gcc:include/x11r5
  52.  
  53. # Location of X11 root directory.
  54. TOPDIR = gcc:
  55.  
  56.  
  57. # Full path for directory that will hold the trap handler file:
  58. TRAP_DIR = spim:lib
  59.  
  60. # Full path for the directory that will hold the executable files:
  61. BIN_DIR = bin:
  62.  
  63. # Full path for the directory that will hold the man files:
  64. MAN_DIR = doc:
  65.  
  66. # Full path for the trap handler file:
  67. TRAP_PATH = \"$(TRAP_DIR)/trap.handler\"
  68.  
  69. # If you have flex, use it instead of lex.  If you use flex, define this
  70. # variable and set LEXFLAGS.
  71. MYLEX = flex
  72.  
  73. # SPIM needs flex's -I flag since the scanner is used interactively.
  74. # You can set the -8 flag so that funny characters do not hang the scanner.
  75. LEXFLAGS = -I -8
  76.  
  77.  
  78. # If you use lex, set the variables this way:
  79. #MYLEX = lex
  80. #LEXFLAGS =
  81.  
  82.  
  83. # Size of the segments when spim starts up (data segment must be >= 64K).
  84. # (These sizes are fine for most users since SPIM dynamically expands
  85. # the memory as necessary.)
  86. MEM_SIZES = -DTEXT_SIZE=65536 -DDATA_SIZE=131072 -DK_TEXT_SIZE=65536
  87.  
  88.  
  89. #
  90. # End of parameters
  91. #
  92.  
  93.  
  94. CC = gcc
  95. OPTFLAGS = /* -O2 */
  96. AMIFLAGS = -Damiga -D_ANSI_SOURCE
  97. IFLAGS = -Igcc:include
  98. CL_FLAG =
  99. CFLAGS = -c $(OPTFLAGS) $(IFLAGS) -D$(ENDIAN) $(AMIFLAGS) $(MEM_SIZES) -I$(X_INCLUDE_DIR) $(EXTRA_C_FLAGS) $(CL_FLAG)
  100. YFLAGS = -d
  101. YCFLAGS =
  102. LDFLAGS = -lnet -lamy -lm
  103. XLDFLAGS = -L$(TOPDIR)/lib -lXaw -lXmu -lXt -lXext -lX11
  104.  
  105.  
  106. # lex.yy.c is usually compiled with -O to speed it up.
  107.  
  108. LEXCFLAGS = -O
  109.  
  110. OBJS = spim-utils.o run.o mem.o inst.o data.o sym-tbl.o y.tab.o lex.yy.o \
  111.        read-aout.o mips-syscall.o
  112.  
  113.  
  114. XOBJS = windows.o buttons.o
  115.  
  116.  
  117. CLOBJS = cl-cache.o cl-except.o cl-tlb.o cl-cycle.o
  118.  
  119.  
  120. spim:    $(OBJS) spim.o
  121.     $(CC) -o spim $(OBJS) spim.o $(LDFLAGS)
  122.  
  123. xspim:    $(OBJS) $(XOBJS) xspim.o
  124.     $(CC) -o xspim $(OBJS) $(XOBJS) xspim.o $(XLDFLAGS) $(LDFLAGS) 
  125.  
  126.  
  127. cl-spim: $(OBJS) $(CLOBJS) spim.o
  128.     $(CC) -o cl-spim $(OBJS) $(CLOBJS) spim.o $(LDFLAGS)
  129.  
  130. cl-xspim: $(OBJS) $(CLOBJS) $(XOBJS) xspim.o
  131.     $(CC) -o cl-xspim $(OBJS) $(CLOBJS) $(XOBJS) xspim.o $(XLDFLAGS) $(LDFLAGS) 
  132.  
  133.  
  134. TAGS:    *.c *.h *.l *.y
  135.     etags *.l *.y *.c *.h
  136.  
  137.  
  138. clean:
  139.     delete spim xspim cl-spim cl-xspim *.o y.output *.bak core a.out \
  140.       .spim-made .cl-spim-made \
  141.       spim.tar.* spim.aux spim.log spim.dvi spim.shar*
  142.  
  143. install: spim xspim
  144.     install -c -s  spim $(BIN_DIR)
  145.     install -c -s  xspim $(BIN_DIR)
  146.     install -c -m 0444 trap.handler $(TRAP_DIR)
  147.     install -c -m 0444 spim.man $(MAN_DIR)
  148.     install -c -m 0444 xspim.man $(MAN_DIR)
  149.  
  150. very-clean: clean
  151.     delete y.tab.h y.tab.c lex.yy.c spim.tar* Documentation/spim.ps
  152.  
  153.  
  154. SRC = spim-utils.c run.c mem.c inst.c data.c sym-tbl.c y.tab.o lex.yy.o \
  155.        read-aout.c mips-syscall.c
  156.  
  157. XSRC = windows.c buttons.c
  158.  
  159.  
  160. #
  161. # Dependences not handled well by makedepend:
  162. #
  163.  
  164. spim-utils.o: spim-utils.c spim.h inst.h mem.h reg.h y.tab.h 
  165.     $(CC) $(CFLAGS) -DDEFAULT_TRAP_HANDLER=$(TRAP_PATH) -DSPIM_VERSION=$(AMIGAVER) -c spim-utils.c
  166.  
  167.  
  168. y.tab.h: y.tab.c
  169.  
  170. y.tab.c: parser.y
  171.     yacc $(YFLAGS) parser.y
  172.  
  173. y.tab.o: y.tab.c
  174.     $(CC) $(CFLAGS) $(YCFLAGS) -c y.tab.c
  175.  
  176.  
  177. lex.yy.c: scanner.l
  178.     $(MYLEX) $(LEXFLAGS) scanner.l
  179.  
  180. lex.yy.o: lex.yy.c
  181.     $(CC) $(LEXCFLAGS) -c lex.yy.c
  182.  
  183.